import axios from 'axios';
const { baseURL } = window.global || {};

// 全局访问路径
if (baseURL) axios.defaults.baseURL = baseURL;

export function login(param) {
  return axios.post('/api/users/login', param);
}

export function register(param) {
  return axios.post('/api/users/register', param);
}

export function profile(param) {
  return axios.post('/api/users/profile', param);
}

export function createRecord(param) {
  return axios.post('/api/records/create', param);
}

export function removeRecord(param) {
  return axios.post('/api/records/remove', param);
}

export function updateRecord(param) {
  return axios.post('/api/records/update', param);
}

export function queryRecord(param) {
  return axios.post('/api/records/list', param);
}



